package com.sdhs.common.enums;

/**
 * 业务上传附件类型枚举
 * @author wangxa
 */
public enum BusinessTypeEnum {
	
    // 示例 项目启动
    GC_PROJECT_DEPT_FORMATION("gc_project_dept_formation","项目部组建"),
    GC_PROJECT_JOINT_DESIGN("gc_project_joint_design","联合设计"),
    GC_PROJECT_CONSTRUCTION_ORGANIZATION_SCHEME("gc_project_construction_organization_scheme","施工组织方案"),

    //项目进度控制
    GS_PROGRESS_MASTER_PLAN_TEMP("gs_progress_master_plan_temp","总体计划变更"),
    GC_PROGRESS_COMPLETION_ON("gc_progress_completion_on","项目竣工"),
    GC_PROGRESS_CONSTRUCTION_LOG("gc_progress_construction_log","施工日志"),
    GC_PROGRESS_HAND_IN("gc_progress_hand_in","项目交工"),
    GC_PROGRESS_PROJECT_END("gc_progress_project_end","项目结束"),
    GC_PROGRESS_PAYMENT_COLLECTION_FILL("gc_progress_payment_collection_fill","回款填报"),

    //成本制
    GC_CONTROL_CONFIRMATION_PURCHASE("gc_control_confirmation_purchase","采购确认"),
    GC_CONTROL_CONTRACT_PAY("gc_control_contract_pay","合同支付跟踪"),
    GC_CONTROL_SETTLEMENT_PAYMENT("gc_control_settlement_payment","项目结算"),
    GC_CONTROL_FINAL_ACCOUNTS("gc_control_final_accounts","项目决算"),
    GC_CONTROL_CHANGE_MANAGEMENT("gc_control_change_management","变更管理"),

    //考核管理
    GC_EXAMINE_MANAGE("gc_examine_manage","项目考核管理"),
    GC_EXAMINE_APPEAL("gc_examine_appeal","项目考核申诉"),
    
    //档案管理
    GC_FILE_MANAGEMENT("gc_file_management","档案管理"),
    //枚举值
    GC_CONTROL_CHANGE("gcControlChange","gcControlChange")
    ;
    private final String code;
    private final String info;

    BusinessTypeEnum(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public String getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }

    public static String getInfo(String code){
        String info = "";
        BusinessTypeEnum[] array = BusinessTypeEnum.values();
        for (BusinessTypeEnum businessFileType : array) {
            if(businessFileType.getCode().equals(code)){
                info = businessFileType.getInfo();
                break;
            }
        }
        return info;
    }
}
